﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartEP.DTO
{
    public class Patient : Person
    {
        #region Enums
        public enum HowToKnow
        {
            FriendFamily = 1,
            InternetSearchEngine,
            InsuranceCarrier,
            RadioTV,
            PrintAd,
            Other
        }
        public enum ContactType
        {
            Soft = 1,
            GasPerm,
            ExendedWear
        }
        public enum Disease
        {
            Gonorrhea = 1,
            HIV,
            Syphilis,
            Hepatitits
        }
        #endregion

        #region Structs

        #endregion

        #region Fields

        #endregion

        #region Properties
        public IList<CheckIn> CheckInTime { get; set; }

        #region Registration
        // Step 1: Privacy Policy and Consent
        public string Signature { get; set; }
        public DateTime RegistrationDate { get; set; }
        public string RelationshipToPatient { get; set; }
        public string PrintName { get; set; }

        // Step 2: Patient Information
        public string PrimaryDoctor { get; set; }
        public DateTime LastMedicalExam { get; set; }
        public HowToKnow HowToKnowAboutUs { get; set; }

        // Step 3: Primary Insurance Information
        public bool HasSecondaryInsurance { get; set; }
        public Insurance PrimaryInsurance { get; set; }

        // Step 4: Secondary Insurance Information
        public Insurance SecondaryInsurance { get; set; }                  

        // Medical History
        // Step 5: Personal Medical History
        public PersonalMedical PersonalMedicalHistory { get; set; }

        // Step 6: Family Medical History
        public FamilyMedical FamilyMedicalHistory { get; set; }

        // Step 7: Social History
        public Social SocialHistory { get; set; }

        // Step 8, 9, 10: Review Of Symptoms
        public Symptoms ReviewOfSymptoms { get; set; }

        // Step 11:
        public ChildDevelopment ChildDevelopmentHistory { get; set; }
        #endregion
        
        public IList<Measurement> Measurements { get; set; }
        public InsurancePlan Plan { get; set; }
        #endregion

        #region Methods
        #endregion

        #region Nested Classes
        public class MedicineAllergy
        {
            #region Properties
            public string Medicine { get; set; }
            public string AdverseReaction { get; set; }
            #endregion
        }
        public class Medication
        {
            #region Properties
            public string Medicine { get; set; }
            public string Dosage { get; set; }
            public string Frequency { get; set; }
            #endregion
        }
        public class Surgery
        {
            #region Properties
            public DateTime SurgeryDate { get; set; }
            public string Description { get; set; }
            #endregion
        }
        public class PersonalMedical
        {
            #region Properties
            public bool HaveAllergies { get; set; }
            public IList<MedicineAllergy> MedicineAllergies { get; set; }
            public IList<Medication> Medications { get; set; }
            public IList<Surgery> MajorSurgeries { get; set; }
            public bool IsPregnantOrNursing { get; set; }
            public bool WearGlasses { get; set; }
            public bool WearContacts { get; set; }
            public int HowOldThePresentContacts { get; set; }
            public ContactType CurrentContactsType { get; set; }
            #endregion
        }
        public class FamilyMedical
        {
            #region Properties
            public string UnknownFamilyHistory { get; set; }
            public bool Blindness { get; set; }
            public bool Cataracts { get; set; }
            public bool CrossedEyes { get; set; }
            public bool Glaucoma { get; set; }
            public bool LazyEye { get; set; }
            public bool MacularDegeneration { get; set; }
            public bool RetinalDetachment { get; set; }
            public bool RetinalDisease { get; set; }
            public bool Arthritis { get; set; }
            public bool Cancer { get; set; }
            public bool Diabetes { get; set; }
            public bool HeartDisease { get; set; }
            public bool HighBloodPressure { get; set; }
            public bool KidneyDisease { get; set; }
            public bool Lupus { get; set; }
            public bool ThyroidDisease { get; set; }
            public bool Other { get; set; }
            #endregion
        }
        public class Social
        {
            #region Properties
            public bool IsDrive { get; set; }
            public bool HaveVisualDifficultyWhenDriving { get; set; }
            public IList<Disease> ExposedOrInfected { get; set; }
            public string DrinkAlcohol { get; set; }
            public string UseTobacco { get; set; }
            public string UseIllegalDrugs { get; set; }
            #endregion
        }
        public class Symptoms
        {
            #region Properties
            public bool NeurologicHeadaches { get; set; }
            public bool Migraines { get; set; }
            public bool Seizures { get; set; }
            public bool LossOfVision { get; set; }
            public bool BlurredVision { get; set; }
            public bool DistortedVisionOrHalos { get; set; }
            public bool LossOfSideVision { get; set; }
            public bool DoubleVision { get; set; }
            public bool Dryness { get; set; }
            public bool MucousDischarge { get; set; }
            public bool Redness { get; set; }
            public bool SandyOrGrittyFeeling { get; set; }
            public bool Itching { get; set; }
            public bool Burning { get; set; }
            public bool ForeignBodySensation { get; set; }
            public bool ExcessiveTearingWatering { get; set; }
            public bool GlareLightSensitivity { get; set; }

            public bool EyePainOrSoreness { get; set; }
            public bool ChronicEyeInfections { get; set; }
            public bool StiesOrChalazions { get; set; }
            public bool FlashesInVision { get; set; }
            public bool FloatersInVision { get; set; }
            public bool EyeInfections { get; set; }
            public bool EyeInjuries { get; set; }
            public bool EyeSurgeries { get; set; }
            public bool Allergies { get; set; }
            public bool HayFevers { get; set; }
            public bool SinusCongestion { get; set; }
            public bool ChronicCough { get; set; }
            public bool DryThroatMouth { get; set; }
            public bool Asthma { get; set; }
            public bool ChronicBronchitis { get; set; }
            public bool Emphysema { get; set; }

            public bool Diabetes { get; set; }
            public bool HeartPain { get; set; }
            public bool HighBloodPressure { get; set; }
            public bool VascularDisease { get; set; }
            public bool Diarrhea { get; set; }
            public bool Constipation { get; set; }
            public bool BonesJointsMuscles { get; set; }
            public bool RheumatoidArthritis { get; set; }
            public bool MusclePain { get; set; }
            public bool JointPain { get; set; }
            public bool Anemia { get; set; }
            public bool BleedingProblems { get; set; }
            public bool Endocrine { get; set; }
            public bool Psychiatric { get; set; }
            #endregion
        }
        public class ChildDevelopment
        {
            #region Properties
            public string BornFullTerm { get; set; }
            public string BirthComplication { get; set; }
            public string PerformingAtGradeLevel { get; set; }
            #endregion
        }
        #endregion
    }       

}
